<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            color: red;
            font-size: 20px;
        }

        div {
            color: yellow;
        }

        .div1 {
            color: blue !important;
        }

        #div1 {
            color: green ;
        }
    </style>
</head>

<body>
    通配符---*(0)
    元素选择器---标签名(1)
    类选择器---class(10)
    id选择器---id(100)
    行内样式---(1000)
    !important---(max)
    <hr>
    <div id="div1" class="div1" style="color: pink;">测试文本</div>
</body>

</html>